//
//  DNDairyManager.h
//  DanoneEA
//
//  Created by Senela on 16/10/18.
//  Copyright © 2016年 翔傲科技. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DNDairyBaseModel.h"

/**
 *  The base class for the business logic of dairy module
 */
@interface DNDairyManager : NSObject

+ (instancetype)sharedInstance;

/**
 *  Get the zero time of four days ago according to today
 *
 *  @return zero time of four days ago
 */
-(NSDate *)getLastFourDate;
 



/**
 *  Business logic processing for add／delete／modify
 *
 *  @param diaryInfo <DNDairyBaseModel>
 *
 *  @return YES/NO
 */
-(BOOL)addDiary:(DNDairyBaseModel *)diaryInfo;
-(BOOL)deleteDiary:(DNDairyBaseModel *)diaryInfo;
-(BOOL)modifyDiary:(DNDairyBaseModel *)diaryInfo;




/**
 *  save diary info in local DB without any modify
 *
 *  @param diaryInfo diaryInfo description
 *
 *  @return YES/NO
 */
-(BOOL)saveDairyToLocalDB:(DNDairyBaseModel *)diaryInfo;

/**
 *  delete diary info from local DB by appId
 *
 *  @param appId
 *
 *  @return YES/NO
 */
-(BOOL)deleteDairyFromLocalDBByAppId:(NSString *)appId;

@end
